using System.Collections.Generic;
using System.Text;

namespace OracleInternal.SqlAndPlsqlParser.LocalParsing.Ansi
{
	internal class OracleLpTablePrimaryElementQueryTableExpression : OracleLpTablePrimaryElement
	{
		protected OracleLpQueryTableExpression m_vQueryTableExpression;

		public override OracleLpTablePrimaryElementType TablePrimaryElementType => OracleLpTablePrimaryElementType.QueryTableExpression;

		public OracleLpQueryTableExpression QueryTableExpression
		{
			get
			{
				return m_vQueryTableExpression;
			}
			set
			{
				m_vQueryTableExpression = value;
				if (m_vQueryTableExpression != null)
				{
					m_vQueryTableExpression.Parent = this;
				}
			}
		}

		public override List<OracleLpColumnDescriptor> ColumnDescriptors => m_vQueryTableExpression.ColumnDescriptors;

		public OracleLpTablePrimaryElementQueryTableExpression(OracleLpStatementElement se)
			: base(se)
		{
		}

		public override void RetrieveNamedObjectReferences(OracleLpStatement statement)
		{
			m_vQueryTableExpression.RetrieveNamedObjectReferences(statement);
		}

		internal override void ToString(StringBuilder sb)
		{
			string depthIndent = base.DepthIndent;
			sb.Append(depthIndent);
		}
	}
}
